﻿namespace ClassLibrary1
{
    public class Test
    {


        /*
         * 安装python
         * 安装Emscripten
         * ./emsdk install latest
         * ./emsdk activate latest --permanent    
         * ./emsdk_env.bat         
         * emcc -v
         * 注意环境变量是否添加 PATH EMSDK
         * 注意修改编译脚本EXPORTED_FUNCTIONS参数
         * dotnet publish /p:NativeLib=Static /p:SelfContained=true -r browser-wasm -c Debug /p:TargetArchitecture=wasm /p:PlatformTarget=AnyCPU /p:MSBuildEnableWorkloadResolver=false /p:EmccExtraArgs="-s EXPORTED_FUNCTIONS=_GetInt%2C_CoreRT_StaticInitialization -s EXPORTED_RUNTIME_METHODS=cwrap" --self-contained
         * 
         * dotnet publish 
         * -r browser-wasm 
         * -c Debug 
         * --self-contained
         * /p:NativeLib=Static 
         * /p:SelfContained=true 
         * /p:TargetArchitecture=wasm 
         * /p:PlatformTarget=AnyCPU 
         * /p:MSBuildEnableWorkloadResolver=false 
         * /p:EmccExtraArgs="-s EXPORTED_FUNCTIONS=_GetInt%2C_CoreRT_StaticInitialization -s EXPORTED_RUNTIME_METHODS=cwrap" 
         * 
         * 使用HTTP服务器运行html，直接访问文件有跨域问题
         * 
        <add key="dotnet-experimental" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json" />
	
        <ItemGroup>
		    <PackageReference Include="Microsoft.DotNet.ILCompiler.LLVM" Version="7.0.0-*" />
		    <PackageReference Include="runtime.win-x64.Microsoft.DotNet.ILCompiler.LLVM" Version="7.0.0-*" />
	    </ItemGroup>
         */

        [System.Runtime.InteropServices.UnmanagedCallersOnly(EntryPoint = "GetInt")]
        public static int GetInt() => 999;



    }
}